Skip to content

fix(create): report add-on dependency install failures - #588

Open
pcbeingused33 wants to merge 1 commit into
TanStack:mainfrom
pcbeingused33:fix/add-install-failure
Open

pcbeingused33 wants to merge 1 commit into
TanStack:mainfrom
pcbeingused33:fix/add-install-failure

Conversation

@pcbeingused33

@pcbeingused33 pcbeingused33 commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

When the package manager exits unsuccessfully, tanstack add ignores its result, reports that dependencies were installed, and omits the command runner's manual retry instructions from its final output.

Use the install result for the spinner and step messages, and include recorded command errors in the final summary. The add-on flow continues through its remaining setup steps and saves the applied configuration in .cta.json.

The regression test simulates a failed npm install and checks the failure message, manual retry instructions, and saved configuration. The successful install test sets intent: false to isolate the dependency-install spinner from the separate Intent setup spinner. All 21 tests in add-to-app.test.ts pass.

AI assistance was used to prepare the patch and regression test.

Summary by CodeRabbit

  • Bug Fixes
    • Add-on installation now reports whether dependencies were installed successfully, with clearer completion or failure messages.
    • When dependency installation fails, the final summary includes the reported errors instead of showing the usual success summary.
    • The add-on remains recorded even if dependency installation fails.

@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

addToApp now reports dependency installation success or failure based on the install result. When environment errors exist, the final summary includes them. Tests cover both outcomes and verify that the add-on is recorded after a failed install.

Changes: Add-on install reporting

Layer / File(s) Summary
Install result and final summary
packages/create/src/add-to-app.ts, packages/create/tests/add-to-app.test.ts
The dependency-install result controls the spinner and step completion messages. The final summary includes environment errors when present. Tests check successful and failed install reporting, error output, and add-on persistence after failure.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: jherr, tannerlinsley

Merge Risk: Minimal · up to 3b638

The add-on command now reports dependency install failures and shows manual retry information instead of claiming success. The change is small and covered by tests, and I found no remaining merge risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "fix(create): report add-on dependency install failures" matches the main change. The summary shows addToApp now uses the packageManagerInstall failed flag for spinner and step messages, and…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(create): report add-on dependency install failures" matches the main change. The summary shows addToApp now uses the packageManagerInstall failed flag for spinner and step messages, and the outro appends environment errors when present. A new test covers a failed npm install and checks the failure spinner, step messages, outro error, and .cta.json recording. The title is specific, concise, and follows the conventional commit style.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bd10ec37-7853-4983-8a47-2d56fa7bcc88
Commits

Reviewing files that changed from the base of the PR and between 40e0043 and 3b638f0.

Files selected for processing: 2

  • packages/create/src/add-to-app.ts
  • packages/create/tests/add-to-app.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@changeset-bot

changeset-bot Bot commented Dec 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3b638f0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@tannerlinsley

Copy link
Copy Markdown
Member

Thanks for fixing the misleading install message! This keeps the applied add-on configuration and gives users the command they need to retry.

AI review notes:
Reviewed the full two-file diff at 3b638f0bcfb9bf81e19ee90148d4a5a1db195e5f against 40e0043707b23b498c6a32950404893817a6f2c3. No dependency, hook or workflow changes.
The failure regression fails against the base implementation and passes on this PR. A built CLI in an outside generated blank app with a controlled failing npm executable reports the failed install and manual retry command, and persists tanstack-query in .cta.json. The command still exits 0, this PR changes reporting rather than exit status.
A frozen install, all 10 repository builds, lint and all 571 unit tests pass on Node 26.3.1. All 22 blocking browser checks pass, with generated apps outside the monorepo.
Exact fork CI runs 46631597210 and 46631597324 still require direct GitHub execution. Current CODEOWNERS does not cover these source/test paths, so this diff has no separate Core codeowner approval requirement. No hosted CI success, merge or release is claimed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants